#version 330 core
out vec4 FragColor;

in vec3 ourColor;
in vec2 TexCoord;

uniform sampler2D texture1;
uniform sampler2D texture2;

// 设置一个变量来控制两个纹理的权重大小，然后在c++代码中通过按下【上下】键盘来改变这个值
uniform float mixValue; 

void main()
{
    FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), mixValue);

    // 笑脸水平朝另外一个方向看
    // FragColor = mix(texture(texture1, TexCoord), texture(texture2, vec2(1.0 - TexCoord.x, TexCoord.y)), 0.2);

    // 笑脸垂直朝另外一个方向看
    // FragColor = mix(texture(texture1, TexCoord), texture(texture2, vec2(TexCoord.x, 1.0 - TexCoord.y)), 0.2);
}